<?php

use yii\db\Schema;
use yii\db\Migration;

class m160121_070726_update_solution_bid_fields extends Migration
{
    public function up()
    {
        $this->alterColumn('{{%solution}}', 'fix_bid_price', "decimal(12,2) default '0.00' COMMENT '竞价价格 CPM'");
        $this->alterColumn('{{%solution}}', 'optimize_bid_cpc', "decimal(12,2) default '0.00' COMMENT '竞价价格 CPM'");
        $this->alterColumn('{{%solution}}', 'optimize_bid_cpm', "decimal(12,2) default '0.00' COMMENT '竞价价格 CPM'");
        $this->alterColumn('{{%solution}}', 'optimize_ctr_target', "decimal(12,2) default '0.00' COMMENT '竞价价格 CPM'");
        $this->alterColumn('{{%solution}}', 'optimize_ctr_cpm', "decimal(12,2) default '0.00' COMMENT '竞价价格 CPM'");
    }

    public function down()
    {
        return true;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
